<?xml version="1.0" encoding="utf-8"?>

<div xmlns="http://www.w3.org/1999/xhtml" component="$UI/system/components/justep/window/window" design="device:mobile"
  xid="window">  
  <div component="$UI/system/components/justep/model/model" xid="model" style="left:18px;top:83px;height:244px;">
    <div component="$UI/system/components/justep/data/baasData" xid="mainData"
      directDelete="true" autoLoad="true" idColumn="fID"
      onSaveCommit="saveCommit"
      queryAction="queryVisual_data_table" tableName="visual_data_table" url="/Highde/data_action" saveAction="saveVisual_data_table" onValueChanged="mainDataValueChanged">
      <column label="ID" name="fID" type="String"
        xid=""/>
      <column label="点名称" name="fPointName" type="String"
        xid=""/>
      <column label="数据点类型" name="fPointType" type="String"
        xid=""/>
      <column label="比例变比" name="fRange" type="Float"
        xid=""/>
      <column label="标准值" name="fStandardValue" type="Double"
        xid=""/>
      <column label="显示名称" name="fDis" type="String"
        xid=""/>
      <column label="所属设备" name="fEquipID" type="String"
        xid=""/>
      <column label="上次记录数据" name="fLastRecordData" type="Double"
        xid=""/>
      <column label="数据单位" name="fUnit" type="String"
        xid=""/>
    	<rule xid="rule1">
   <col name="fID" xid="ruleCol1">
    <calculate xid="calculate1">
     <expr xid="default2">justep.UUID.createUUID()</expr></calculate> </col> 
   <col name="fRange" xid="ruleCol2">
    <constraint xid="constraint1">
     <expr xid="default4">(/^[1-9][0-9]*$/).test( $row.val(&quot;fRange&quot;))</expr>
     <message xid="default5">比例变比应为整数</message></constraint> 
    <required xid="required1">
     <expr xid="default6">true</expr>
     <message xid="default7">请填写变比比例</message></required> </col> 
   <col name="fStandardValue" xid="ruleCol3">
    <constraint xid="constraint2">
     <expr xid="default8">(/^[0-9]+([.]{1}[0-9]+){0,1}$/).test( $row.val(&quot;fStandardValue&quot;))</expr>
     <message xid="default9">标准值应为数字</message></constraint> 
    <required xid="required2">
     <expr xid="default10">true</expr>
     <message xid="default11">请填写标准值</message></required> </col> 
   <col name="fPointType" xid="ruleCol4">
    <required xid="required3">
     <expr xid="default12">true</expr>
     <message xid="default13">请选择数据点类型</message></required> </col> 
   <col name="fPointName" xid="ruleCol5">
    <required xid="required4">
     <expr xid="default14">true</expr>
     <message xid="default15">请填写数据点名称</message></required> </col> </rule></div>
  <div component="$UI/system/components/justep/data/baasData" autoLoad="true" xid="pointTypeData" queryAction="queryData_type_table" saveAction="saveData_type_table" url="/Highde/type_action" tableName="data_type_table" idColumn="fType" limit="-1">
   <column label="数据来源类型" name="fType" type="String" xid="default1"></column>
   <column label="单位" name="fUnit" type="String" xid="default3"></column></div></div>  
  <span component="$UI/system/components/justep/windowReceiver/windowReceiver" xid="windowReceiver1" onReceive="windowReceiver1Receive"></span><div component="$UI/system/components/justep/panel/panel" class="x-panel x-full"> 
    <div class="x-panel-top"> 
      <div component="$UI/system/components/justep/titleBar/titleBar" title="目视数据信息"
        class="x-titlebar"> 
        <div class="x-titlebar-left"> 
          <a component="$UI/system/components/justep/button/button" label=""
            class="btn btn-link btn-only-icon" icon="icon-chevron-left" onClick="{operation:'window.close'}"
            xid="backBtn"> 
            <i class="icon-chevron-left"/>  
            <span/> 
          </a> 
        </div>  
        <div class="x-titlebar-title"><![CDATA[目视数据信息]]></div>  
        <div class="x-titlebar-right reverse"><a component="$UI/system/components/justep/button/button" class="btn btn-default" label="保存" xid="button1" onClick="{operation:'mainData.save'}">
   <i xid="i1"></i>
   <span xid="span1">保存</span></a>
  <a component="$UI/system/components/justep/button/button" class="btn btn-default" label="新增" xid="button2" onClick="{operation:'mainData.new'}">
   <i xid="i2"></i>
   <span xid="span2">新增</span></a></div> 
      </div> 
    </div>  
    <div class="x-panel-content"> 
      <div component="$UI/system/components/justep/controlGroup/controlGroup"
        class="x-control-group" title="详细信息"> 
        <div class="x-control-group-title">详细信息</div> 
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fPointName')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fPointName')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fPointType')"/>  
          <div class="x-edit">
            <select component="$UI/system/components/justep/select/select" bind-optionsCaption="请选择..." class="form-control" xid="select1" bind-options="pointTypeData" bind-ref='$model.mainData.ref("fPointType")' bind-labelRef='$model.mainData.ref("fPointType")' bind-optionsValue="fType" bind-optionsLabel="fType"></select></div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fRange')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fRange')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fStandardValue')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fStandardValue')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fDis')"/>  
          <div class="x-edit">
            <input class="form-control" component="$UI/system/components/justep/input/input"
              data="mainData" bind-ref="mainData.ref('fDis')"/>
          </div> 
        </div>
        <div component="$UI/system/components/justep/labelEdit/labelEdit" class="x-label-edit x-label20"> 
          <label class="x-label left" bind-text="$model.mainData.label('fUnit')"/>  
          <div class="x-edit">
            <div component="$UI/system/components/justep/output/output" class="x-output" xid="output2" bind-ref='$model.mainData.ref("fUnit")'></div></div> 
        </div>
      </div> 
    </div> 
  </div> 
</div>